package com.epfresh.bean;

/**
 * Created by wzh on 2016/4/12.
 */
public class CouponEntity  implements Cloneable{

    /**
     * id : 325
     * name : 采购商优惠券
     * number : 160905001400
     * description : a
     b
     城市
     * phone : 23232323232
     * gotTime : 2016-09-05 22:22:02
     * type : 1
     * storeId : null
     * hasUsed : false
     * usedTime : null
     * orderNo : null
     * fullPrice : 100.0
     * minusPrice : 15.0
     * activityId : 14
     * supplierCouponId : null
     * beginTime : 2016-09-07 00:00:00
     * endTime : 2016-09-10 00:00:00
     * storeName : null
     * infoFlag 是否显示提示信息
     */
    /*{
        "id": 1836,
            "name": "xx",
            "subTitle": null,
            "number": "xx",
            "phone": null,
            "gotTime": "2016-09-08 00:26:25",
            "type": 1,
            "storeId": null,
            "usedTime": null,
            "orderNo": null,
            "fullPrice": 10,
            "minusPrice": 10,
            "activityId": 25,
            "supplierCouponId": null,
            "description": null,
            "selected": null,
            "beginTime": "2016.09.06",
            "endTime": "2016.09.28",
            "storeName": null
    }*/
    private boolean infoFlag;
    private String id;
    private String name;
    private String number;
    private String description;
    private String phone;
    private String gotTime;
    private String type;
    private String storeId;
    private boolean hasUsed;
    private String usedTime;
    private String orderNo;
    private String fullPrice;
    private String minusPrice;
    private String activityId;
    private String supplierCouponId;
    private String beginTime;
    private String endTime;
    private String storeName;
    //是否选中
    private Boolean selected;
    //是否可用
    private boolean isCanUse;
    //系统推荐
    private Boolean selectedAdvice;

    public boolean isInfoFlag() {
        return infoFlag;
    }

    public void setInfoFlag(boolean infoFlag) {
        this.infoFlag = infoFlag;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getGotTime() {
        return gotTime;
    }

    public void setGotTime(String gotTime) {
        this.gotTime = gotTime;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public boolean isHasUsed() {
        return hasUsed;
    }

    public void setHasUsed(boolean hasUsed) {
        this.hasUsed = hasUsed;
    }

    public String getUsedTime() {
        return usedTime;
    }

    public void setUsedTime(String usedTime) {
        this.usedTime = usedTime;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getFullPrice() {
        return fullPrice;
    }

    public void setFullPrice(String fullPrice) {
        this.fullPrice = fullPrice;
    }

    public String getMinusPrice() {
        return minusPrice;
    }

    public void setMinusPrice(String minusPrice) {
        this.minusPrice = minusPrice;
    }

    public String getActivityId() {
        return activityId;
    }

    public void setActivityId(String activityId) {
        this.activityId = activityId;
    }

    public String getSupplierCouponId() {
        return supplierCouponId;
    }

    public void setSupplierCouponId(String supplierCouponId) {
        this.supplierCouponId = supplierCouponId;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public Boolean getSelected() {
        return selected == null ? false : selected;
    }

    public void setSelected(Boolean selected) {
        this.selected = selected;
    }

    public boolean isCanUse() {
        return isCanUse;
    }

    public void setCanUse(boolean canUse) {
        isCanUse = canUse;
    }

    public Boolean getSelectedAdvice() {
        return selectedAdvice;
    }

    public void setSelectedAdvice(Boolean selectedAdvice) {
        this.selectedAdvice = selectedAdvice;
    }

    public float getFullPriceFloat() {
        float f = 0;
        if (fullPrice != null && !"".equals(fullPrice)&& !"null".equals(fullPrice)){
            f = Float.valueOf(fullPrice);
        }
        return f;
    }
    public float getMinusPriceFloat() {
        float f = 0;
        if (minusPrice != null && !"".equals(minusPrice)&& !"null".equals(minusPrice)){
            f = Float.valueOf(minusPrice);
        }
        return f;
    }

    public CouponEntity clone() {
        CouponEntity o = null;
        try {
            o = (CouponEntity) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return o;
    }
    public CouponEntity clone2() {

//        private boolean infoFlag;
//        private String id;
//        private String name;
//        private String number;
//        private String description;
//        private String phone;
//        private String gotTime;
//        private String type;
//        private String storeId;
//        private boolean hasUsed;
//        private String usedTime;
//        private String orderNo;
//        private String fullPrice;
//        private String minusPrice;
//        private String activityId;
//        private String supplierCouponId;
//        private String beginTime;
//        private String endTime;
//        private String storeName;
//        //是否选中
//        private Boolean selected;
//        //是否可用
//        private boolean isCanUse;
//        //系统推荐
//        private Boolean selectedAdvice;
        CouponEntity o = new CouponEntity();
        o.setActivityId(activityId);
        o.setBeginTime(beginTime);
        o.setSelected(selected);
        o.setCanUse(isCanUse);
        o.setDescription(description);
        o.setEndTime(endTime);
        o.setFullPrice(fullPrice);
        o.setGotTime(gotTime);
        o.setHasUsed(hasUsed);
        o.setId(id);
        o.setInfoFlag(infoFlag);
        o.setEndTime(endTime);
        o.setMinusPrice(minusPrice);
        o.setName(name);
        o.setNumber(number);
        o.setPhone(phone);
        o.setType(type);
        return o;
    }

    @Override
    public String toString() {
        return "CouponEntity{" +
                "infoFlag=" + infoFlag +
                ", id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", number='" + number + '\'' +
                ", description='" + description + '\'' +
                ", phone='" + phone + '\'' +
                ", gotTime='" + gotTime + '\'' +
                ", type='" + type + '\'' +
                ", storeId='" + storeId + '\'' +
                ", hasUsed=" + hasUsed +
                ", usedTime='" + usedTime + '\'' +
                ", orderNo='" + orderNo + '\'' +
                ", fullPrice='" + fullPrice + '\'' +
                ", minusPrice='" + minusPrice + '\'' +
                ", activityId='" + activityId + '\'' +
                ", supplierCouponId='" + supplierCouponId + '\'' +
                ", beginTime='" + beginTime + '\'' +
                ", endTime='" + endTime + '\'' +
                ", storeName='" + storeName + '\'' +
                ", selected=" + selected +
                ", isCanUse=" + isCanUse +
                ", selectedAdvice=" + selectedAdvice +
                '}';
    }
}
